package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.RoutinePatient;
import com.zhijian.medical.entity.vo.request.RoutinePatientSearchVo;
import com.zhijian.medical.entity.vo.response.RoutinePatientVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoutinePatientMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RoutinePatient record);

    int insertSelective(RoutinePatient record);

    RoutinePatient selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RoutinePatient record);

    int updateByPrimaryKeySelectiveBlh(RoutinePatient routinePatient);

    int updateByPrimaryKey(RoutinePatient record);

    /**
     * 查询总数
     *
     * @param routinePatientSearchVo
     * @return
     */
    int count(RoutinePatientSearchVo routinePatientSearchVo);

    /**
     * 查询列表
     *
     * @param routinePatientSearchVo
     * @return
     */
    List<RoutinePatientVo> selectList(RoutinePatientSearchVo routinePatientSearchVo);

    /**
     * 查询单个
     *
     * @param routinePatientSearchVo
     * @return
     */
    RoutinePatientVo selectOne(RoutinePatientSearchVo routinePatientSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    RoutinePatientVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param routinePatientSearchVo
     * @return
     */
    void deleteByCondition(RoutinePatientSearchVo routinePatientSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<RoutinePatient> entities);

    /**
     * 根据年份查找出最大的分子病理号
     *
     * @param year
     * @return
     */
    String selectMaxMoleculePathologyNumberByYear(String year);

    int countFast(RoutinePatientSearchVo routinePatientSearchVo);

    /**
     * 查询列表
     *
     * @param routinePatientSearchVo
     * @return
     */
    List<RoutinePatientVo> selectListFast(RoutinePatientSearchVo routinePatientSearchVo);
}